package cn.yuanqiao.archive.Identify.mapper;/**
 * @author 赵常飞
 * @date 2023/7/10 10:25
 */

import cn.yuanqiao.archive.appManager.domain.DataScopeBase;
import cn.yuanqiao.common.annotation.DataScope;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @AUTHOR:赵常飞
 * @date 2023/7/10 10:25
 */
public interface MjIdentifyMapper {
    @DataScope(deptAlias = "ff", userAlias = "ff",deptColumn = "gdcs_id",userColumn = "create_id")
    List<Map<String, Object>> getlist(@Param("dataScopeBase") DataScopeBase dataScopeBase,
                                      @Param("fields") String fields, @Param("tablename") String tablename,
                                      @Param("daFolderTable") String daFolderTable,
                                      @Param("subTableName") String subTableName,
                                      @Param("tiaojian") String tiaojian, @Param("order") String order
                                      ,@Param("approveType") String approveType);

    /**
     * 查询元数据方案
     *
     * @param tableName
     * @param type
     * @param groupId
     * @return
     */
    List<Map<String, Object>> selectMDataListTableData(@Param("tableName") String tableName, @Param("type") String type,
                                                       @Param("groupId") String groupId);

    /**
     * 拼接sql查询
     *
     * @param field
     * @param sql
     * @return
     */
    List<Map<String, Object>> selectUnionALLTableData(@Param("field") String field, @Param("sql") String sql);
    /**
     * 拼接sql查询
     *
     * @param field
     * @param sql
     * @return
     */
    List<Map<String, Object>> selectUnionALLTableDataTiaojian(@Param("field") String field, @Param("sql") String sql, @Param("tioajian") String tioajian);

    /**
     * 更新sql
     *
     * @param sql
     * @return
     */
    int updateTableData(@Param("sql") String sql);
}
